package org.example.controller;

import org.example.bean.User;
import org.example.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("sys/user")
public class UserCotroller {
    @Autowired
    private UserService userService;

    @GetMapping("getUserList")
    public List<Map> getUserList() {
        return userService.getUserList();
    }

    @PostMapping("save")
    public void save(@RequestBody User user){
        userService.save(user);
    }


}
